package com.mpsc.mongodb.provide.config;

import lombok.extern.slf4j.Slf4j;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobKey;
import org.springframework.scheduling.quartz.QuartzJobBean;

@Slf4j
public class HelloWorldJob extends QuartzJobBean {

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        JobKey key = jobExecutionContext.getJobDetail().getKey();
        log.info("[JobKey] name:{},group:{}", key.getName(), key.getGroup());
        JobDataMap jobDataMap = jobExecutionContext.getJobDetail().getJobDataMap();
        log.info("[jobDataMap] arg1:{},arg2:{}", jobDataMap.get("arg1"), jobDataMap.get("arg2"));


    }
}
